/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: 锟斤拷锟斤拷</p>
 * <p>CreateTime: 2006-3-27 </p>
 * @author pengz
 * @version 1.0
 */

package cn.agiledata.bank.myspace.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import cn.agiledata.bank.common.util.PageBean;
import cn.agiledata.bank.hibernateBean.Account;
import cn.agiledata.bank.hibernateBean.AccountBank;
import cn.agiledata.bank.hibernateBean.AccountHis;
import cn.agiledata.bank.hibernateBean.AccountLimit;
import cn.agiledata.bank.hibernateBean.Acctlimithis;
import cn.agiledata.bank.hibernateBean.ActionType;
import cn.agiledata.bank.hibernateBean.BankInfo;
import cn.agiledata.bank.hibernateBean.GradeRules;
import cn.agiledata.bank.hibernateBean.Groups;
import cn.agiledata.bank.hibernateBean.Operator;
import cn.agiledata.bank.hibernateBean.SubAccount;
import cn.agiledata.bank.hibernateBean.Transaction;
import cn.agiledata.bank.myspace.bean.AccountHisQueryDetailBean;
import cn.agiledata.bank.myspace.bean.PaperBean;

public interface IMySpaceService {

	public String MGR_ID = "mySpaceService";

	public Account getAccount(String  id);
	
	public PageBean getAccountHisListPageBean(Map param, int pageNo, int recordPerPage);
	
	public Transaction getTransaction(String id);

	public int updateMail(Map map);

	public int updateAccountBank(Map map);

	public int updateLoginPass(Map map);

	public int updatePayPass(Map map);

	public boolean updateAccount(Account account);
//锟剿伙拷锟斤拷询	
	public List accountQueryList(Map parameter, int pageNo, int recordPerPage);

	public List accountHisQueryList(Map parameter, int pageNo, int recordPerPage);

	public int accountHisQueryCount(Map parameter);
	
	public AccountHisQueryDetailBean accountHisQueryDetail(String tid,String aid);

	
	public AccountBank getAccountBank(String l);
	
	public void updateAccountBank(AccountBank ab);
	
	public void delAccountBank(String aBankID);
	
	public void delPeerAccount(String acctID);
	
	public void updateBankSetDefault(String aBankID);
	
	public BankInfo getBankInfo(String l);
	public void sendRegisterActivate(String accountID);
	
	//锟斤拷莶锟斤拷锟斤拷锟絠d锟矫碉拷锟斤拷锟斤拷锟斤拷锟斤拷息
	public Operator getOperatorById(String id);
	
	//锟斤拷锟斤拷锟剿伙拷锟斤拷息
	public List getAccountBankList(String accountID);
	
	//锟睫改诧拷锟斤拷锟斤拷
	public void updateOperator(Operator oper);

	//锟斤拷锟阶讹拷锟斤拷锟叫憋拷
	public List getTrxObjectList(String accountID);
	/**
	 * 锟角凤拷锟斤拷唯一锟斤拷锟街讹拷
	 * @param value
	 * @param dbName
	 * @return
	 */
	public boolean isUniqueSubAccountField(String value,String dbName,String createUser);
	
	/**
	 * 锟角凤拷锟斤拷唯一锟斤拷锟街讹拷,锟斤拷锟斤拷锟斤拷锟?锟斤拷锟斤拷锟截革拷锟斤拷之锟斤拷
	 * @param value
	 * @param dbName
	 * @param id
	 * @return
	 */
	public boolean isUniqueSubAccountFieldExcludeOwn(String value,String dbName,String id,String createUser);
	
	public void saveOrUpdateAccount
	(Account acc,InputStream photoStream,InputStream cardPhotoStream)throws Exception;
	public PageBean getAcctSubHisPageBean(Map param, int pageNo, int recordPerPage);
	
	public void saveAcctHis(AccountHis acctHis);
	
	public List getSubAccountList(String id);
	
	public void updateSubAccount(SubAccount sub);
	
	public void updateAcctLimit(AccountLimit al);
	
	public void saveAcctLimit(AccountLimit al);
	
//	public Acctlimit getAcctlimitByAcctGrading(Account account);
	public AccountLimit getAcctlimitByAcctGrading(Account account);
//	public Acctlimit getAcctlimitByAcctId(String id);
	public AccountLimit getAcctlimitByAcctId(String id);
	
	public void setSumAmmount();
	
	public void saveAcctLimitHis(Acctlimithis als);
	
	//public GradingRules getGradingRulesByGrading(String gradingId);
	public GradeRules getGradingRulesByGrading(Account account);
	public List getAuthenticationById(String id);
	
	public List getAuthenticationMethod();
	
	public List authenticat(List authenticationList,Account account);
	
	public void setList(List allList,List must,List notMust);
	
	public void ifAccess(HttpServletRequest request,Account account);
	
	public Groups getGroupByAccount(Account acc,String type);
	
	public Set getAccountGroupsSet(Account acc,String groupType,Groups group);

	
	public PaperBean getPaper(String tid,String aid);
	/**
	 * 根据客户当前的限制等级，查询它后一等级
	 * @param id
	 * @return
	 */
	public Groups getNextLimit(String id);
	/**
	 * 判断该企业帐户是否设置过操作员
	 * @param accountId
	 * @return
	 */
	 public boolean hasOperators(String accountId);
	 
	 public boolean hasAuditGroup(String accountId);
	 
	 public boolean ifCouldPay(String opId,String subId);
	 
	 public ActionType getActionTypeById(String id);
	 
	 public List getAuditOper(String accountId);
	 
	 public List getAuditStepList(List auditOperList,int size);
	 
	 public boolean ifOperUsed(String operId);
	 
	 public boolean isUniqueAccountBank(String accountId, Long accountSeq, Long id);
	 
	 public boolean isUniqueAccountAlias(String bankAlias, Long accountSeq, Long id);
}
